<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8"/>
    <title>意见和建议</title>
</head>

<body >

<div class="page" id="app">

    <el-input
            type="textarea"
            :autosize="{ minRows: 8, maxRows: 16}"
            placeholder="欢迎提出意见和建议(发送到作者钉钉号)"
            v-model="suggestDTO.content">
    </el-input>
    <el-row>
        <el-button type="success" @click="suggest">确定</el-button>
    </el-row>

</div>

<!--<script src="/js/http_cdnjs.cloudflare.com_ajax_libs_vue_2.7.0-alpha.4_vue.js"></script>-->
<!--<script src="/js/http_unpkg.com_axios_dist_axios.js"></script>-->
<!--&lt;!&ndash; 引入样式 &ndash;&gt;-->
<!--<link rel="stylesheet" href="/js/http_unpkg.com_element-ui_lib_theme-chalk_index.css.js">-->
<!--&lt;!&ndash; 引入组件库 &ndash;&gt;-->
<!--<script src="/js/http_unpkg.com_element-ui_lib_index.js"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.7.0-alpha.4/vue.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>
    let vue = new Vue({
        el:"#app",
        data:{
            suggestDTO:{
                content: '',
            }
        },
        methods:{
            suggest() {
                if (this.suggestDTO.content == '') {
                    alert("请先输入内容")
                    return
                }
                axios.post('/dingTalk',this.suggestDTO).then((res)=>{
                    if (res.data.success) {
                        alert("意见/建议 发送成功")
                    } else {
                        alert("意见/建议 发送失败 " +res.data.errorMsg )
                    }

                })
            },

        },

    });

</script>

</body>
<style>
    .page{
        text-align: center;
    }

</style>
</html>